﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace YTCMS.Domain.Entities
{
    [Table("products")]
    public partial class products
    {
        [Key]
        public int Id { get; set; }
        [Required(ErrorMessage="商品名称必填")]
        public string Name { get; set; }
        public string Tag { get; set; }
        [Required(ErrorMessage = "价格必填")]
        [RegularExpression(@"^(-)?(([1-9]{1}\d*)|([0]{1}))(\.(\d){1,2})?$", ErrorMessage = "请输入正确的金额！")]
        public Nullable<decimal> Price { get; set; }
         [RegularExpression(@"^(-)?(([1-9]{1}\d*)|([0]{1}))(\.(\d){1,2})?$", ErrorMessage = "请输入正确的金额！")]
        public Nullable<decimal> OldPrice { get; set; }
        public Nullable<int> CategoryId { get; set; }
        [ForeignKey("CategoryId")]
        public virtual category category { get; set; }
        public Nullable<int> BrowseNo { get; set; }
        public Nullable<int> MarketNo { get; set; }
        [RegularExpression(@"^-?(?:\d+|\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$", ErrorMessage = "请输入正确的数字！")]
        public Nullable<int> Sort { get; set; }
        [Required(ErrorMessage="库存必填")]
        [Range(1, int.MaxValue, ErrorMessage = "年龄不能小于1！")]     
        public Nullable<int> Stock { get; set; }
        public Nullable<sbyte> IsRecommend { get; set; }
        public Nullable<int> State { get; set; }
        public string Phone { get; set; }
        public string QQ { get; set; }
        public Nullable<int> uid { get; set; }
        public System.DateTime CreateTime { get; set; }
        public System.DateTime EditTime { get; set; }
        public string Image { get; set; }
        public string Introduce { get; set; }
        public string Remark { get; set; }
       
        public string Feature { get; set; }
        public string Agreement { get; set; }
        public Nullable<int> HodometerDay { get; set; }
        public string Hodometer { get; set; }
        public Nullable<sbyte> IsActivity { get; set; }
        public Nullable<int> PayTpeId { get; set; }
        public string Hotel { get; set; }
        public string Vehicle { get; set; }

        public string strcategory { get; set; }

        public Nullable<sbyte> IsPush { get; set; }

        public string Latest { get; set; }

        public string WapRemark { get; set; }
        public string WapHodometer { get; set; }
        public string WapAgreement { get; set; }

        public string WapFeature { get; set; }
    }
}
